]> dgit.raspbian.org Git - gnome-shell.git/commit
Initialize properties in _init()
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 13 Jun 2017 02:24:12 +0000 (04:24 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Jul 2017 15:23:54 +0000 (17:23 +0200)
commit358133e82f6afbc93204555dde0100666af9222b
tree110642b53d8d78b54dc23226ce88276f0739a6df
parent526f2c8bcfdc3efbffba8425d69858195081c797
Initialize properties in _init()

While we've always considered it good style to initialize JS properties,
some code that relies on uninitialized properties having an implicit
value of 'undefined' has slipped in over time. The updated SpiderMonkey
version used by gjs now warns when accessing those properties, so we
should make sure that they are properly initialized to avoid log spam,
even though all warnings addressed here occur in conditionals that
produce the correct result with 'undefined'.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
js/gdm/util.js
js/ui/appDisplay.js
js/ui/lookingGlass.js
js/ui/messageList.js
js/ui/remoteSearch.js
js/ui/status/network.js
js/ui/workspace.js